//
//  UIButton+Extension.swift
//  Microblog
//
//  Created by steaest on 15/8/6.
//  Copyright © 2015年 steaest. All rights reserved.
//

import UIKit


extension UIButton {

    convenience init (title: String, imageName: String, color: UIColor = UIColor.darkGrayColor(), fontSize: CGFloat = 12) {
        self.init()
        
        setImage(UIImage(named: imageName), forState: UIControlState.Normal)
        setTitle(title, forState: UIControlState.Normal)
        setTitleColor(color, forState: UIControlState.Normal)
        titleLabel?.font = UIFont.systemFontOfSize(fontSize)
    }
}